package com.laima.basic.controller;

import com.laima.basic.Exception.Response;
import com.laima.basic.model.SysMenu;

import com.laima.basic.service.SysMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* <p>
    * 菜单 前端控制器
    * </p>
*
* @author admin
* @since 2021-03-29
*/

@RestController
@RequestMapping("/sys-menu")
@Api(tags = {"菜单管理"})
public class SysMenuController {

    @Autowired
    private SysMenuService sysMenuService;


    private Logger logger =  LoggerFactory.getLogger(SysMenuController.class);


   /* @ApiOperation(value = "selectById", notes = "根据id查询 ")
    @RequestMapping(value = "selectById", method = RequestMethod.POST)
    public Response selectById(@RequestBody(required=false) SysMenu sysMenu) {
        return Response.ok(sysMenuService.getById(sysMenu));
    }


    @ApiOperation(value = "insertBySysMenu", notes = "添加菜单")
    @RequestMapping(value = "insertBySysMenu", method = RequestMethod.POST)
    public Response insertBySysMenu(@RequestBody(required=false) SysMenu sysMenu) {
        return Response.ok(sysMenuService.save(sysMenu));
    }


    @ApiOperation(value = "upadteBySysMenu", notes = "编辑菜单")
    @RequestMapping(value = "upadteBySysMenu", method = RequestMethod.POST)
    public Response upadteBySysMenu(@RequestBody(required=false) SysMenu sysMenu) {
        return Response.ok(sysMenuService.updateById(sysMenu));
    }

*/


}

